home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 4 / Precision Software Applications Silver Collection Volume 4 (1993).iso / stats / mathx30.exe / FINANCE.APR < prev    next >
Text File  |  1991-07-20  |  8KB  |  327 lines

  1. |FINANCE.APR file, Copyright 1991 by David Denker|
  2. if h'''=1}10
  3. dsp;
  4.   DISCLAIMER!
  5.       Even though I have tested all calculations and believe them
  6.   to be accurate, I do not guarantee their accuracy.  Your use of
  7.   the information  provided  by  this program is at your own risk.
  8.   If  you  are using this program to make important decisions,  I
  9.   suggest  you  also  consider  contacting  a  financial planning 
  10.   professional.
  11.      Hit any key to continue.;
  12. wait50
  13. #10
  14. h'''=1
  15. i=sloc:if i=0}1:CALL7:GO4
  16. call7:goto4
  17. #1
  18. digr6:digl6:boff:xoff:aon
  19. #3:cls
  20. DSP ;
  21.  Amortization table. (can be printed)
  22.  Balance of loan payoff.
  23.  Compound interest
  24.  Effective earnings percentage rate.
  25.  Loan interest rate. (from No. of payments and amount)
  26.  Payments. (from Int. rate, Loan value & No. payments)
  27.  Quit.
  28.  Savings table. (can be printed)
  29.  
  30.  SELECT BY THE FIRST LETTER: ;
  31. I=KYIN:if i=27}q:CALL7
  32. #4
  33. if j=1}100
  34. IF J=2}600
  35. IF J=3}610
  36. if j=4}150
  37. if j=5}200
  38. if j=6}300
  39. if j=7}q
  40. if j=8}400
  41. go3
  42. #7:if i>64}}if i<91}}i=i+32:if i>96}}if i<123}}k=i-97
  43. #8:j=data k{1,2,3,0,4,0,0,0,0,0,0,5,0,0,0,6,7,0,8,0,0,0,0,0,0,0}:ret
  44. #40
  45. dsp n; Do you want a printout? (Y/N) ;:$p=inp
  46. if $p=;Y;}41,if $p=;YES;}41:ret
  47. #41
  48. pon:dsp N; Is the printer on? (Y/N) ;:$p=inp
  49. if $p=;Y;}r:if $p=;YES;}r:poff:ret
  50. #80
  51. dsp nn; "M"enu, "R"edo, else quit! ;:i'=kyin:cls
  52. if i'=77}1:if i'=109}1:if i'=82}4:if i'=114}4:quit
  53. #90
  54. i'=-1
  55. DSP n; Enter interest rate %: ;:i'=inp
  56. if i'=-1}r:if i'<0}91:i'=i'*.01
  57. dsp n; Enter total number of payments: ;:t'=inp
  58. if t'<1}91
  59. dsp n; Enter number of payments per year: ;:n''=inp
  60. if n''<1}91
  61. dsp n; Enter loan value: ;:v'=inp
  62. if v'=<0}91
  63. p'=v'/((1-((1+i'/n'')^-t'))/(i'/n''))
  64. ret
  65. #91
  66. i'=-2:ret
  67. #100:cls:XOFF
  68. DSP N; AMORTIZATION TABLE:;N
  69. call90:if i'=-1}1:if i'=-2}510:call40
  70. n''=1:y''=1:r''=v':p''=0:i''=0:p'''=0:i'''=0
  71. digl7:digr2:n'=1
  72. dprn nn; Monthly payment = ;(p');
  73.  
  74.  Payment  Amount to   Amount to      Principal      Interest      Principal
  75.   number  Principal   Interest        to date        to date      remaining
  76. ;n
  77. #103
  78. if y''=y'''}104:digr0:digl3:dprn; Year;(y'')n:y'''=y''
  79. #104
  80. digr0:digl5:dprn (n'):n'=n'+1:n''=n''+1
  81. digl7:digr2
  82. i''=r''*i'/12:p''=p'-i'':p'''=p'''+p'':i'''=i'''+i'':r''=r''-p''
  83. digl5
  84. dprn(p'')(i'')
  85. digl8:dprn(p''')(i''')(r'')n
  86. if n''=13}}y''=y''+1:if n''=13}}n''=1
  87. if n'<t'+1}103
  88. goto80
  89. #150
  90. cls:s'=-99:xoff
  91. dsp n; EFFECTIVE EARNINGS RATE:;
  92. dsp nn; Enter starting balance:;:s'=inp
  93. if s'=-99}1:if s'=0}520:if s'<0}520
  94. dsp n; Enter ending balance:  ;:e'=inp
  95. if e'<0}520
  96. dsp n; Enter deposits made:   ;:d'=inp
  97. if d'<0}520
  98. dsp n; Enter No. of days involved: (Yr.=365) ;:y'=inp
  99. if y'=<0}520
  100. m'=e'-s'-d':i=m'/s':c'=4
  101. #151
  102. m'=e'-s'-d'-d'/2*i:i=m'/s':c'=c'-1:if c'<>0}151
  103. digr2:digl4
  104. dsp n;
  105.  Effective Earnings Percentage Rate = ;(i*100);%
  106.  Effective  Yearly  Percentage Rate = ;(i/y'*365*100);%;n
  107. goto80
  108. #200
  109. cls:n'=0:xoff
  110. DSP N; LOAN INTEREST RATE:;N
  111. dsp n; Enter total number of payments: ;:n'=inp
  112. if n'<0}530:if n'=0}1
  113. dsp n; Enter number of payments per year: ;:n''=inp
  114. if n''=<0}530
  115. dsp n; Enter amount of each payment: ;:p'=inp
  116. t'=p':if p'=<0}530
  117. dsp n; Enter loan amount: ;:p''=inp
  118. if p''=<0}530:c'=5
  119. #201
  120. i'=(n''*2*(p'*n'-p''))/(p''*(n'+1))
  121. if c'=0}205:c'=c'-1
  122. p'''=p''/((1-((1+i'/n'')^-n'))/(i'/n''))
  123. p'=p'-(p'''-t')*.58:goto201
  124. #205
  125. digr2:digl2:dprn nn; Loan interest rate = ;(i'*100);%;
  126. goto80
  127. #300
  128. digr2:digl7
  129. cls
  130. DSP N; PAYMENTS for Loan:;N
  131. call90:if i'=-1}1:if i'=-2}540:digr2
  132. dsp nn; Monthly payment = ;(p')
  133. goto80
  134. #400:cls
  135. xoff:digr2:koff:b'=-1
  136. dsp n; SAVINGS ACCOUNT TABLE:;
  137. dsp nn; Enter starting balance: ;:b'=inp
  138. if b'=-1}1:if b'<0}550
  139. dsp n; Enter interest rate: ;:i'=inp
  140. if i'<0}550:i'=i'*.01
  141. dsp n; Enter number of years: ;:y''=inp
  142. if y''<1}550
  143. #401
  144. dsp n; Enter interest compound rate:
  145.    "Y"early
  146.    "S"emi-annually
  147.    "Q"uarterly
  148.    "M"onthly
  149.    "D"aily 
  150.    
  151.    Select by the first letter: ;
  152. $r=inp(1):i''=0
  153. if $r="Y"}}i''=1
  154. if $r="S"}}i''=2
  155. if $r="Q"}}i''=4
  156. if $r="M"}}i''=12
  157. if $r="D"}}i''=365
  158. if i''<>0}402:beep:goto401
  159. #402:
  160. i=i'/i''
  161. dsp n; Enter deposit rate:
  162.    "N"one
  163.    "Y"early
  164.    "M"onthly
  165.    "W"eekly ;n
  166. #403:$c=inp(1):r'=0
  167. if $c="N"}}r'=400
  168. if $c="Y"}}r'=366
  169. if $c="M"}}r'=32
  170. if $c="W"}}r'=8
  171. if r'<>0}406:beep:goto403
  172. #406
  173. c'=0:if $c="N"}407
  174. dsp n; Enter deposit amount: ;:c'=inp
  175. if c'<0}550
  176. #407
  177. dsp nn; Enter table print and/or display period:
  178.    "E"nding ballance only
  179.    "Y"early ballance
  180.    "M"onthly ballance
  181.    "W"eekly ballance 
  182.  
  183.    Select by the first letter: ;
  184. $p=inp(1):p'=0
  185. if $p="E"}}p'=400
  186. if $p="Y"}}p'=366
  187. if $p="M"}}p'=32
  188. if $p="W"}}p'=8
  189. if p'<>0}411:beep:goto407
  190. #411
  191. $p=;1 Week;:if p'=8}412
  192. $p=;1 Month;:if p'=32}412
  193. $p=;1 Year;
  194. #412
  195. dsp n; Do you want a printout? (Y/N) ;:$a=inp(1)
  196. if $a<>"Y"}415
  197. dsp n; Is the printer on? (Y/N) ;:$a=inp(1):if $a<>"Y"}415
  198. pon
  199. #415
  200. i'''=0:c''=0:q'=91:y'=1:p''=1:m'=32:n'=1:x''=0:m'''=1:q'''=1:m''=1:q''=1
  201. t'=0:t''=0:d'=1:n''=1:n'''=1:b''=0:if p'=400}416
  202. dprn nn;
  203.  Starting Balance = ;(b');
  204.  Interest rate = ;(i'*100);%
  205.  Each period = ;$p;
  206.                                        Interest      Deposits
  207.  Period    Interest     Deposit        to date       to date        Balance;n
  208. goto420
  209. |  p''          i'''      c''        t'           t''          b' |
  210. #416
  211. dprn nn;
  212.  Starting Balance = ;(b');
  213.  Interest rate = ;(i'*100);%
  214.  
  215.         Total           Total           Ending
  216.        Interest        Deposits        Balance;n
  217. GOTO420
  218. #417
  219. if i''=365}449
  220. if i''=12}}if n'=m'}450
  221. if i''=4}}if n'=q'}450
  222. if i''=2}}if n'=182}450
  223. if i''=1}}if n'=366}450
  224. #420
  225. if r'=n''}c452:if n'''=p'}c465
  226. if m'<>m''}422:m'''=m'''+1:if m'''=13}}m'''=1
  227. m'=data m'''{0,32,29,32,31,32,31,32,32,31,32,31,32}
  228. if p'>27}}if p'<33}}p'=m':m''=1
  229. #422
  230. if q'<>q''}424:q'''=q'''+1:if q'''=5}}q'''=1
  231. q'=data q'''{0,91,92,93,93}
  232. #424
  233. n'=n'+1:n''=n''+1:m''=m''+1:q''=q''+1:d'=d'+1:n'''=n'''+1
  234. if d'<>367}417:d'=2:n''=1:p''=1
  235. if n'''>365}}n'''=1:if y'=>y''}430:y'=y'+1:goto417
  236.  
  237. #430:if p'=400}c470:goto80
  238.  
  239. #449
  240. b'=b'+b'':b''=0
  241. #450
  242. z'=b'*i+x'':b'=b'+z'+b'':i'''=i'''+z':n'=1:x''=0:b''=0:goto420
  243.  
  244. #452
  245. b''=b''+c':c''=c''+c':if i''=365}460
  246. if i''<>12}454:x'=m'-n':goto459
  247. #454
  248. if i''<>4}456:x'=q'-n':goto459
  249. #456
  250. if i''<>2}458:x'=182-n':goto459
  251. #458
  252. x'=366-n'
  253. #459
  254. x''=x''+x'*(i'/365)*c'
  255. #460
  256. n''=1:ret
  257. #465
  258. t'=t'+i''':t''=t''+c''
  259. if p''<>1}466:digl3:digr0:dprn; Year;(y')n
  260. #466
  261. digr0:digl2
  262. dprn (p'')
  263. digr2:digl8
  264. dprn(i'''):digl6
  265. dprn(c''):digl8
  266. dprn(t'):digl7
  267. dprn(t''):digl9
  268. dprn(b'+b'')n
  269. p''=p''+1:n'''=1:c''=0:i'''=0
  270. ret
  271. #470
  272. t'=t'+i''':t''=t''+c''
  273. digr2:digl9:dprn (t')(t'')(b')n
  274. ret
  275. #510
  276. CALL511:wait10:go100
  277. #511
  278. dsp nn; Note:  Do not enter negitive numbers.
  279.         In some cases entering 0 is also not allowed.
  280. ;:RET
  281. #520
  282. CALL511:wait10:go150
  283. #521
  284. dsp nn; Note:  Do not enter negitive numbers or 0
  285. ;:RET
  286. #530
  287. CALL521:wait10:go200
  288. #540
  289. CALL521:wait10:go300
  290. #550
  291. CALL511:wait10:go400
  292. #555
  293. CALL521:WAIT10:GO600
  294. #560
  295. CALL521:WAIT10:GO610
  296. #600
  297. CLS:n'=0:xoff
  298. DSP N; BALANCE OF LOAN PAYOFF:;N
  299. dsp n; Enter total number of payments left: ;:n'=inp
  300. if n'<0}555:if n'=0}1
  301. dsp n; Enter number of payments per year: ;:n''=inp
  302. if n''=<0}555
  303. dsp n; Enter amount of each payment: ;:p'=inp
  304. if p'=<0}555
  305. dsp n; Enter loan interest rate: ;:i''=inp
  306. if i''=<0}555
  307. i''=i''/100
  308. p''=-P'*(1-((1+i''/n'')^n'))/(i''/n'')
  309. digr2:digl8:dprn nn; BALANCE OF LOAN PAYOFF = ;(p'')
  310. goto80
  311. #610
  312. CLS:n'=0:xoff
  313. DSP N; COMPOUND INTEREST:;N
  314. dsp n; Enter total number of years: ;:n'=inp
  315. if n'<0}560:if n'=0}1
  316. dsp n; Enter number of times compounded per year: ;:n''=inp
  317. if n''=<0}560
  318. dsp n; Enter starting balance: ;:p'=inp
  319. if p'=<0}560
  320. dsp n; Enter yearly interest rate: ;:i''=inp
  321. if i''=<0}560
  322. i''=i''/100
  323. p''=P'*(1+I''/N'')^(N'*N'')
  324. digr2:digl8:dprn nn; COMPOUND INTEREST = ;(p''-p')
  325. dprn n; PLUS PRINCIPAL    = ;(p'')
  326. goto80
  327.